Skip to content

Remove content app redirect for manifest fetching#2358

Draft
gerrod3 wants to merge 1 commit into
pulp:mainfrom
gerrod3:issue-1974
Draft

Remove content app redirect for manifest fetching#2358
gerrod3 wants to merge 1 commit into
pulp:mainfrom
gerrod3:issue-1974

Conversation

@gerrod3
Copy link
Copy Markdown
Contributor

@gerrod3 gerrod3 commented May 6, 2026

Fixes #1974
https://redhat.atlassian.net/browse/PULP-486

To properly remove the redirect for manifest fetching I had to remove the PullThroughCaching redirect logic as well. Now the entirety of PullThroughCaching lives on the registry_api side, no more content app logic needed. These are the three scenarios we were handling for pull-through caching:

  1. Manifest tag fetch:
    Upon first fetch you need to create the tag and download the manifest and initiate a task to download the rest of the image in the background (tag=None, local_manifest=None). If the upstream manifest already exists on Pulp you simply need to create the tag and add it and the image's content to the repo (tag=None, local_manifest is not None). On the second fetch of a tag with pull-through you need to check to see if the tag has been updated on the remote. There are three scenarios for this: one - new upstream manifest that needs to be downloaded to Pulp (tag is not None, local_manifest=None), two - new upstream manifest already in Pulp needs to be added to repo (tag is not None, local_manifest is not None), and three - no changes on upstream (tag is not None, tag.manifest.digest == local_manifest.digest). If the tag doesn't exist on the remote, but we have the tag locally then we should serve our local copy (tag is not None, fetch_manifest raised ApiException).
  2. Manifest digest fetch:
    When fetching a manifest by digest we either have it or we don't. If we don't, we check the upstream if it's there. If yes, then we check if the manifest is in Pulp locally and just needs to be added to the repo, or if we need to download the whole image in the background.
  3. Blob fetch:
    When fetching a blob and we don't have it in the repository we check to see if the remote has the blob. If so, we create the blob as an on-demand content and redirect to the content-app for it to finish streaming the blob from the upstream. We also add it to the pending_blobs to speed up future requests.

📜 Checklist

  • Commits are cleanly separated with meaningful messages (simple features and bug fixes should be squashed to one commit)
  • A changelog entry or entries has been added for any significant changes
  • Follows the Pulp policy on AI Usage
  • (For new features) - User documentation and test coverage has been added

See: Pull Request Walkthrough

@gerrod3 gerrod3 force-pushed the issue-1974 branch 4 times, most recently from 848ee41 to 5ad30c0 Compare May 8, 2026 15:45
@dralley dralley marked this pull request as draft May 12, 2026 01:04
fixes: pulp#1974
Assisted by: claude-sonnet-4.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Omit redirects to content-app

1 participant